package com.swq.java.code.chapter18.code02;

import com.swq.java.code.utils.PathUtil;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInputStreamTester {
    public static void main(String agrs[]) throws IOException {
        // 改成相对路径
        FileInputStream in = new FileInputStream(PathUtil.getResourcesFilePath("test.txt").toFile());
        int data;
        while ((data = in.read()) != -1)
            System.out.print(data + " ");
        in.close();
    }
}